package com.iotechn.unimall.app.api.running;

/*
@author kbq
@date  2019/7/4 - 21:36
*/

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.dto.RunningAdminApplyDTO;

@HttpOpenApi(group = "running.adminApply", description = "跑步--管理员")
public interface RunningAdminApplyService {

    @HttpMethod(description = "管理员申请列表")
    public Page<RunningAdminApplyDTO> selectApplyPage(@NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId,
                                                      @HttpParam(name = "pageNo", valueDef = "1", type = HttpParamType.COMMON, description = "分页查询偏移量") Integer pageNo,
                                                      @HttpParam(name = "pageSize", valueDef = "10", type = HttpParamType.COMMON, description = "分页查询长度") Integer pageSize);



    @HttpMethod(description = "申请成为管理员")
    public Boolean apply(
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户ID") Long userId) throws ServiceException;


    @HttpMethod(description = "管理员申请审批")
    public Boolean approvalRecord(
            @NotNull @HttpParam(name = "recordId", type = HttpParamType.COMMON, description = "记录id") Long recordId,
            @NotNull @HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态：1、通过；2、不通过") Integer status,
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户ID") Long userId) throws ServiceException;




}
